import config
from api.ihrm_emp_manage_api import IHRMEmpManageApi
from common.get_token_util import TokenTuil


class GetEmpId:

    @classmethod
    def get_emp_id(cls):
        token = TokenTuil.get_token()
        print(token)
        body = {
            "username": "小猪佩奇",
            "mobile": config.TEL,
            "workNumber": "22"
        }
        resp = IHRMEmpManageApi.add_emp_api(token, body)
        emp_id = resp.json().get("data").get("id")
        return emp_id, token


if __name__ == '__main__':
    print(GetEmpId.get_emp_id())
